import '../../public.dart';

class CarouselApi {
  /// 查询轮播图列表
  /// /carouselChart/getList
  static Future<BaseResponse<List<CarouselChartEntity>>> getList() async {
    final response = await HttpUtil().request(
      '/carouselChart/getList',
      method: 'GET',
    );
    return BaseResponse<List<CarouselChartEntity>>.fromJson(
      response,
      fromJsonT: (json) => (json as List)
          .map<CarouselChartEntity>((e) => CarouselChartEntity.fromJson(e))
          .toList(),
    );
  }
}
